From: Chong Yidong Date: Wed, 8 Jul 2009 03:10:10 +0000 (+0000) Subject: * mail/unrmail.el (unrmail): Make sure the message ends with two X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~11604 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=9bddc88b99e338a419efc50ca8a85a5a1fa64d08;p=emacs.git * mail/unrmail.el (unrmail): Make sure the message ends with two newlines (Bug#3769). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 14c922845cb..5c4c760db9b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-07-08 E. Jay Berkenbilt (tiny change) + + * mail/unrmail.el (unrmail): Make sure the message ends with two + newlines (Bug#3769). + 2009-07-08 Glenn Morris * calendar/calendar.el (calendar-current-date): Rework previous change. diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el index cd71ec58571..e06c41b2c2e 100644 --- a/lisp/mail/unrmail.el +++ b/lisp/mail/unrmail.el @@ -232,6 +232,10 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'." (while (search-forward "\nFrom " nil t) (forward-char -5) (insert ?>))) + ;; Make sure the message ends with two newlines + (goto-char (point-max)) + (unless (looking-back "\n\n") + (insert "\n")) ;; Write it to the output file, suitably encoded. (let ((coding-system-for-write coding)) (write-region (point-min) (point-max) to-file t